<%-- 
    Document   : view
    Created on : 05.08.2014, 22:01:13
    Author     : Andrey
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<div class="col-md-9">

<c:if test="${not empty users}">


    <table class="table table-striped table-bordered table-hover">
        <thead>
        <tr>
            <td>Id</td>
            <td>Login</td>
            <td>Email</td>
            <td>Controls</td>
        </tr>
        </thead>
        <tbody>
        <c:forEach var="user" items="${users}">
            <tr>
                <td>${user.userId}</td>
                <td>${user.userLogin}</td>
                <td>${user.userEmail}</td>
                <td>
                    <a href="<c:url value="/admin/users/edit/${user.userId}" />">
                        <button type="button" class="btn btn-success btn-sm">Edit</button>
                    </a>
                    <a href="<c:url value="/admin/users/remove/${user.userId}" />">
                        <button type="button" class="btn btn-warning btn-sm">Delete</button>
                    </a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    </div>
</c:if>

